//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.hafu.util;

public class StringUtil {
    public StringUtil() {
    }

    public static boolean isEmpty(String str) {
        return str == null || str.trim().length() == 0;
    }

    public static void main(String[] args) {
        String s1 = null;
        String s2 = "";
        System.out.println(s2);
        System.out.println((String)s1);
        System.out.println(isEmpty((String)s1));
        System.out.println(isEmpty(s2));
    }

    public static boolean isTotalPriceNumber(String password) {
        return password.matches("^[0-9]+\\.?[0-9]{0,2}$");
    }

    public static boolean isIntNumber(String password) {
        return password.matches("^[0-9]+$");
    }

    public static boolean isNumber(String password) {
        return password.matches(".*[0-9].*");
    }

    public static boolean isUpperCase(String password) {
        return password.matches(".*[a-z].*");
    }

    public static boolean isLowerCase(String password) {
        return password.matches(".*[A-Z].*");
    }

    public static boolean isPhoneNumber(String phone) {
        if (phone == null || phone.length() != 11) {
            return false;
        }
        // 匹配中国大陆手机号格式：以13、14、15、17、18、19开头的11位数字
        String regex = "^1[3-9]\\d{9}$";
        return phone.matches(regex);
    }

}
